#include "ConstantSensor.h"

/*! \brief Creates a new instance of a constant sensor
 *
 * @param value
 * @param channelNumber
 * @param sensorNumber
 */
ConstantSensor::ConstantSensor(float value, UINT8 channelNumber, UINT8 sensorNumber, std::string sensorName)
{
	this->_value = value;
	this->_channelNumber = channelNumber;
	this->_sensorNumber = sensorNumber;
	this->_sensorName = sensorName;
}

/*! \brief Default destructor
 */
ConstantSensor::~ConstantSensor() { }

/*! \brief Updates the value of the constant sensor
 */
void ConstantSensor::UpdateValue()
{
	return;
}

/*! \brief Sets the value of the constant sensor
 */
void ConstantSensor::SetValue(float value)
{
	this->_value = value;
}

/*! \brief Returns the value of the constant sensor
 */
float ConstantSensor::GetValue()
{
	return this->_value;
}

/*! \brief Channel Number used in CPT software
 *
 * @returns Channel number used in CPT software
 */
UINT8 ConstantSensor::GetChannelNumber()
{
	return this->_channelNumber == '0' ? this->_channelNumber : this->_channelNumber + '0';
}

/*! \brief Sensor Number used in CPT software
 *
 * @returns Sensor number used in CPT software
 */
UINT8 ConstantSensor::GetSensorNumber()
{
	return this->_sensorNumber == '0' ? this->_sensorNumber : this->_sensorNumber + '0';
}

/*! \brief Name of sensor
 *
 * @returns Name of sensor
 */
std::string ConstantSensor::GetSensorName()
{
	return this->_sensorName;
}
